<!DOCTYPE html>
<html>

<head lang="en">
    <title>积分商城</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/strategy.css"/>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>


    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>

</head>

<body>
<div class="search-head">
    <!--<div class="bk21" id="mess_box" style="overflow-y:auto;overflow:scroll; position:absolute;top=0px; left:0px;">-->
    <div class="row nav-search" style="background-color: yellowgreen">
        <div class="col-12">
            <a href="/mine/integralStore.html">
                <span class="headInfo"><i class="fa fa-chevron-left fa-1x"></i>

                </span>
            </a>
        </div>
    </div>
    <div>
        <img src="/img/u=3066882233,3496844441&fm=26&gp=0.jpg" width="100%">
    </div>
</div>

<ul class="nav nav-pills nav-justified border border-left-0 border-top-0 border-right-0" id="pills-tab" role="tablist">
    <li class="nav-item">
        <a class="nav-link active show" id="pills-top-tab2" data-toggle="pill" href="#pills-top">
            <span style="font-weight: bold;">兑换记录</span>
        </a>
    </li>

</ul>


<div class="tab-content" id="pills-tabContent">
    <div class="tab-pane fade active show" id="pills-top">
        <hr>
        <div class="container strategyCommend ">
            <div class="row hot" render-loop="integralStore">
                <div class="col-12" >
                        <p style="background-color: #F9DF3B">
                            <img render-src="integralStore.productImgUrl">
                            所需积分<span render-html="integralStore.product"></span></p>
                    <hr style="background-color: #00bbd3;height: 1px"/>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
            var user = JSON.parse(sessionStorage.getItem("user"));
            if (user) {
                $.get("/days/points", {userId: user.id}, function (data) {
                    $(".headInfo").append("--尊敬的用户:[ " + user.nickName + " ]剩余积分:" + data);
                })
            }
            $.get("/users/"+user.id+"/products", function (data) {
                console.log(data);
                $(".strategyCommend").renderValues(data);
            });
    })

</script>
</body>

</html>